﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.IO;

namespace Technewlogic.FileXChange
{
	/// <summary>
	/// Summary description for Service1
	/// </summary>
	[WebService(Namespace = "http://www.technewlogic.de/FileXChange")]
	[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
	[System.ComponentModel.ToolboxItem(false)]
	// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
	// [System.Web.Script.Services.ScriptService]
	public class FileService : System.Web.Services.WebService
	{
		private readonly FileServiceLogic _fileServiceLogic = new FileServiceLogic();

		#region FileService Interface

		[WebMethod]
		public byte[] Get(string filename)
		{
			return _fileServiceLogic.Get(filename);
		}

		[WebMethod]
		public void Post(string filename, byte[] file)
		{
			_fileServiceLogic.Post(filename, file);
		}

		[WebMethod]
		public void Delete(string filename)
		{
			_fileServiceLogic.Delete(filename);
		}

		#endregion
	}
}
